package com.levnli;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author levnl
 */
@SpringBootApplication
public class SpringbootDemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringbootDemoApplication.class, args);
    }

    @RestController
    static class TestController {

        @Value("${spring.profiles.active}")
        private String env;

        @RequestMapping("/test")
        public String test() {
            return "当前项目启动环境" + env;
        }
    }

}
